function [RK,valmed1,valmed2]=Puntoc(a,b,ya,h,f1,f2)
% Ejemplo de invocaci??n
% Puntoc(0,48,10,0.01,"f1","f2");

% Parametros de Runge kutta-4
%T=zeros(1,M+1);
%Y1=zeros(1,M+1);
%Y2=zeros(1,M+1);
%T=a:h:b;
%Y1(1)=ya;
%Y2(1)=ya;

% modelo de simulaci??n
kArr=[0.25,0.5,1,2,5,10,15,20];
global ku;
global k;
global TOUT_M;
global TD;

TD=20;
TOUT_M=10;
k=kArr(1);
ku=0.7;


RK=rk4gral(a,b,ya,h,f1);

%for j=1:M   
%	K1=feval(f1,T(j),Y1(j));
%	K2=feval(f1,T(j)+(h/2),Y1(j)+(K1/2));
%	K3=feval(f1,T(j)+(h/2),Y1(j)+(K2/2));
%	K4=feval(f1,T(j)+h,Y1(j)+K3);

%	Y1(j+1)=Y1(j)+(1/6)*(K1+2*K2+2*K3+K4)*h;
%end
RK2=rk4gral(a,b,ya,h,f2);
%for j=1:M   
%	K1=feval(f2,T(j),Y2(j));
%	K2=feval(f2,T(j)+(h/2),Y2(j)+(K1/2));
%	K3=feval(f2,T(j)+(h/2),Y2(j)+(K2/2));
%	K4=feval(f2,T(j)+h,Y2(j)+K3);

%	Y2(j+1)=Y2(j)+(1/6)*(K1+2*K2+2*K3+K4)*h;
%end

%RK=[T' Y1'];

%RK2=[T' Y2'];

%plot(RK(:,1),RK(:,2));
%plot(RK2(:,1),RK2(:,2));
plot(RK(:,1),RK(:,2),'*',RK2(:,1),RK2(:,2),'--',RK(:,1),Tout(RK(:,1)),'-',RK(:,1),ones(length(RK(:,1)))*TD,'-');
legend('Modelo 1', 'Modelo 2', 'Tout', 'Location','NorthEastOutside');

desv1 = RK(floor(length(RK)/2):length(RK),2);
desv1 = (desv1 - TD);
desv1 = desv1.^2;
valmed1 = sqrt(sum(desv1))/(length(RK(:,2))/2);

desv2 = RK2(floor(length(RK2)/2):length(RK2),2);
desv2 = (desv2 - TD);
desv2 = desv2.^2;
valmed2 = sqrt(sum(desv2))/(length(RK2(:,2))/2);

%global IMG_PATH;
%print(strcat(IMG_PATH,"Punto1c.png"));
%replot;

%title('Comparaci?n de ambos modelos de variaci?n de la temperatura')
xlabel('Tiempo (s)');
ylabel('Temperatura (C)');


end


